<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
		<link rel="stylesheet" href="http://127.0.0.1/vancl_php/Application/Index/View/css/style.css" />
		<script>
			var showCart = "<?php echo U('Cart/ajaxGoods');?>";
			var app = "<?php echo U('Details/index');?>";
			var delCart = "<?php echo U('Cart/delCart');?>";
			var root = "http://127.0.0.1/vancl_php/";
		</script>
		<link rel="stylesheet" href="http://127.0.0.1/vancl_php/Static/css/hdjs.css" />
		<link rel="stylesheet" href="http://127.0.0.1/vancl_php/Application/Index/View/css/commonjs.css" />
		<script src="http://127.0.0.1/vancl_php/Static/js/jquery-1.7.2.min.js"></script>
		<script src="http://127.0.0.1/vancl_php/Static/js/common.js"></script>
		<script src="http://127.0.0.1/vancl_php/Application/Index/View/js/showCart.js"></script>
		<script type="text/javascript">
			$(function(){
				$('.category').hover(function(){
					$(this).find('.categoryLeft').css({'background':'#B81B22'});
					$(this).find('.categoryRight').css({'background':'#F7F7F7'});
					$(this).find('.categoryLeft a').css({'color':'white'});
				},function(){
					$(this).find('.categoryLeft').css({'background':'white'});
					$(this).find('.categoryRight').css({'background':'white'});
					$(this).find('.categoryLeft a').css({'color':'#333'});
				})
			})
		</script>
		<link rel="stylesheet" href="http://127.0.0.1/vancl_php/Application/Index/View/css/list.css" />
		
		<title>搜索:<?php echo $hd['get']['searchkey'];?></title>
		<style type="text/css">
			.nothot{
				color:#666 !important;
			}
			.hd-page .count,.nowPage{
				color:#BC1B22;
			}
			.hd-page .selfpage,.hd-page .pagebt{
				border:1px solid #BC1B22 !important;
				background: #BC1B22 !important;
			}
		</style>
	</head>
	
	<body>
		<!--头部开始-->
		<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<div id="header">
	<script type="text/javascript">
		var getgoods = "<?php echo U('Index/getGoodsName');?>";
		var search = "<?php echo U('Search/index');?>";
		var showlist = "<?php echo U('List/index');?>";
	</script>
			<!-- 头部广告位置 -->
			<div class="adWrap">
				<div class="headAd">
					<a href="">
						<img src="http://127.0.0.1/vancl_php/Application/Index/View/Img/head_top_ad.jpg" alt="头部广告位" />
					</a>
				</div>
				<!-- 头部广告位置结束 -->
			</div>
			<!--头部登陆信息开始-->
			<div class="toptopare">
				<div class="arewarp">
					<!--左边欢迎登陆文字开始-->
						<div class="welcome">
							    <?php if(isset($hd['session']['uid'])){ ?>
								 您好！
							 <a href="<?php echo U('UserInfo/index');?>" style="color:#B81B22;font-weight: 700;"><?php echo $hd['session']['username'];?></a>
							 <a href="<?php echo U('Login/loginout');?>" style="color:#B81B22;">退出登录</a>
							<?php }else{ ?>
							您好,欢迎光临凡客诚品！
							<span class="loginreg">
								<a href="<?php echo U('Login/index');?>">登陆</a>
								｜ 
								<a href="<?php echo U('Register/index');?>">注册</a>
							</span>
							<?php } ?>
						</div>
					<!--左边欢迎登陆文字结束-->
					<!--订单收藏-->
						<div class="orderads">
							<a href="<?php echo U('UserInfo/orderList');?>">我的订单</a>
								 
							<a href="">收藏本站</a>
						</div>
					<!--订单收藏结束-->
					<!-- 右边下拉列表-->
					<div class="droplist">
						<div href="" id="myVancl" class="mylist">
							<a href="">我的凡客 <span class="jt"></span></a>
							<ul class="myVanclList">
								<li><a href="">我的订单</a></li>
								<li class="liBottom"><a href=""></a></li>
							</ul>
						</div>
						<div href="" class="mylist">
							<a href="">网站导航 <span class="jt"></span></a>
							<ul class="myVanclList">
								<li><a href="">我的订单</a></li>
								<li class="liBottom"><a href=""></a></li>
							</ul>
						</div>
						<div href="" class="mylist">
							<a href="">帮助中心 <span class="jt"></span></a>
							<ul class="myVanclList">
								<li><a href="">购物指南</a></li>
								<li><a href="">配送方式</a></li>
								<li><a href="">支付方式</a></li>
								<li><a href="">售后服务</a></li>
								<li><a href="">投诉建议</a></li>
								<li><a href="">在线客户</a></li>
								<li class="liBottom"><a href=""></a></li>
							</ul>
						</div>
						<div href="" class="mylist">
							<a href="">网站公告 <span class="jt"></span></a>
							<ul class="myVanclList">
								<li><a href="">我的订单</a></li>
								<li class="liBottom"><a href=""></a></li>
							</ul>
						</div>
					</div>
					<!--右边下拉列表结束-->
				</div>
			</div>
			<!--头部登陆信息结束-->
			<!--logo和搜索条-->
			<div class="logoArea">
				<!--logo-->
				<a href="<?php echo U('Index/index');?>" class="logo"></a>
				<!--logo结束-->
				<!--搜索区开始-->
				<div class="serachArea">
					<div class="searchTopAre">
					<!--搜索框-->
					<div class="searchInput">
						<form action="<?php echo U('Search/index');?>" method="get">
							<input type="text" name="searchkey" autocomplete="off" id="inputBox"/>
							<div class="inputbox" >
							</div>
							<input type="submit" id="searchBtn" value="搜索" />
						</form>
					</div>
					<!--购物车-->
					<div class="shopCart">
						<a href="<?php echo U('Cart/index');?>" style="color:white">购物车</a>(<span class="carNum">    <?php if(isset($hd['session']['cart']['total_rows'])){ ?><?php echo $hd['session']['cart']['total_rows'];?><?php }else{ ?>0<?php } ?></span>)
						<div class="showCartList">
							<!--目前没有商品-->
							<p class="cartTitle">最近加入购物车</p>
							<ul>
								
							</ul>
							<!--购物车底部-->
							<div class="cartBottom">
								<div class="left">
									共计
									<p>￥0.00元</p>
								</div>
								<!--右边进入详细购物车页-->
								<div class="right">
									<a href="<?php echo U('Cart/index');?>">查看购物车</a>
								</div>
							</div>
						</div>
					</div>
					<!--购物车结束-->
					</div>
					<!--热门搜索-->
					<div class="hotKeyword">
						<!--<span>热门搜索:</span>
						<a href="">吉武国</a>
						<a href="">T恤</a>
						<a href="">卡其裤</a>
						<a href="">长场雄</a>
						<a href="">POLO</a>
						<a href="">麻牛仔</a>
						<a href="">皮肤衣</a>
						<a href="">牛津纺</a>-->
					</div>
					<!--热门搜索结束-->
					
					<!--搜索框结束-->
				</div>
				<!--搜索区结束-->
			</div>
			<!--logo和搜索条结束-->
			<!--导航区-->
			<div id="navbar" style="position:relative;">
				<div class="navFirst" >
					全部商品分类
					
					<!--下拉菜单 -->
					<div class="dropLists" style="text-align: left;">
					
						<?php foreach ($rightCateTree as $key=>$val){?>
						<dl>
							<span><?php echo $val['cname'];?></span>
							<?php foreach ($val['son'] as $k=>$v){?>	
							    <?php if($k==0){ ?>
								<dd>
							<?php }else{ ?>
								<dd class="otherCate">
							<?php } ?>
								<p>
									<a href="http://127.0.0.1/vancl_php/index.php/Index/List/index/cid/<?php echo $v['cid'];?>"><?php echo $v['cname'];?></a>
								</p>
								
								<p class="sonCate">
									<?php foreach ($v['son'] as $ky=>$vl){?>
										<a href="http://127.0.0.1/vancl_php/index.php/Index/List/index/cid/<?php echo $vl['cid'];?>"     <?php if($vl['is_hot']==1){ ?>class="hot"<?php }else{ ?>class="nothot"<?php } ?> ><?php echo $vl['cname'];?></a>
									<?php }?>
								</p>
														
							</dd>
							<?php }?>
							</dl>
    					<?php }?>
    					
					</div>
					<!--下拉菜单 -->
					<span class="downArrowTop"></span>
				</div>
				<div class="navList" >
					<ul>
						<?php foreach ($topCate as $key=>$val){?>
						<li><a href="<?php echo U('List/index',array('cid'=>$val['cid']));?>" title=<?php echo $val['ckeywords'];?>><?php echo $val['cname'];?></a>
							<!--当前这个分类下页推荐的2个商品-->
							<div class="cateProduct">
								<!--分页推荐商品左边-->
								<?php foreach ($val['son'][0] as $kk=>$vv){?>
								<div class="productLeft"     <?php if($kk==1){ ?>style="border:none;"<?php } ?>>
									<div class="wrapProduct">
										<a href="http://127.0.0.1/vancl_php/index.php/Index/Details/index/gid/<?php echo $vv['gid'];?>">
											<img src="http://127.0.0.1/vancl_php/<?php echo $vv['goods_listimg'];?>" alt="" width="140" height="140" />
										</a>
										<p class="goods">
											<a href="http://127.0.0.1/vancl_php/index.php/Index/Details/index/gid/<?php echo $vv['gid'];?>"><?php echo hd_substr($vv['goods_name'],8,'');?></a>
										</p>
										<div class="goodsDesc">
											<p class="goodsPrice" style="margin-top:50px;margin-left:20px;">
											￥<?php echo $vv['shop_price'];?>
											</p>
										</div>
										
									</div>
								</div>
								<?php }?>
							</div>
						</li>
						<?php }?>
					</ul>
				</div>
			</div>
			<!--导航区结束-->
		</div>
		<!-- 头部结束  --> 
		<!-- 头部结束  -->
		<!-- 列表页开始 -->
		<div id="content">
			<!--//面包屑导航-->
			<div class="breadBist">
				<div class="left">
					<span>当前位置：</span>
					<a href="<?php echo U('List/index');?>">首页</a> >
					搜索:<?php echo $hd['get']['searchkey'];?>
				</div>
				<div class="right">
					<span>找到相关商品<span class="pcount"><?php echo $count;?></span>款
					</span>
				</div>
			</div>
			<!--尺码选择-->
			<div class="selectSize">
				<!--尺码选择区-->
				<div class="typearea">
					<!--分类名-->
					<?php $tmp = $param ?>
					<?php foreach ($attrlist as $k=>$v){?>
					<div class="category">
						<div class="categoryLeft">
							<a href="javascript:;"><?php echo $v['name'];?></a>
						</div>
						<div class="categoryRight">
							<ul>
								<!--先保存到一临时变量中这样就不会被下面的foreach覆盖-->
								<?php $param = $tmp ?>
								<?php 
										$param[$k]=0;
										$tmp2 =$param;
									?>
								
								<li><a href="http://127.0.0.1/vancl_php/index.php/Index/Search/index/searchkey/<?php echo $hd['get']['searchkey'];?>/param/<?php echo implode('_',$tmp2) ?>"     <?php if($tmp[$k]==0){ ?>class="select"<?php } ?>>不限</a></li>
								<?php foreach ($v['value'] as $kk=>$vv){?>
								<?php $param[$k] = $vv['attid'] ?>
								<li>
									<a     <?php if($tmp[$k]==$vv['attid']){ ?>class="select"<?php } ?> href="http://127.0.0.1/vancl_php/index.php/Index/Search/index/searchkey/<?php echo $hd['get']['searchkey'];?>/param/<?php echo implode('_',$param)?>"><?php echo $vv['attr_value'];?></a>
								</li>
								<?php }?>
							</ul>
						</div>
					</div>
					<?php }?>
					<!--分类名结束-->
				</div>
				<!--尺码选择区结束-->
			</div>
			<!--尺码选择结束-->
			<!--列表头部-->
			<div class="productTitle">
				<div class="wrapTitle">
						<div class="title">
							<a href="<?php echo U('List/index',array('cid'=>$hd['get']['cid']));?>">全部商品</a>
						</div>
						<!--小分页-->
						<div class="titlePage">
							<?php echo $page2;?>
						</div>
				</div>
				<!--小分页结束-->
				<!--筛选按钮-->
				<div class="selectArea">
					<!--筛选按钮-->
					<div class="selectBtn">
						<ul>
							<li>
								<a href="<?php echo U('index',array('searchkey'=>$hd['get']['searchkey']));?>" title="默认由高到低">
									默认
									<span class="upArrow"></span>
								</a></li>
							<li><a href="" title="销量由高到低">
									销量
									<span class="upArrow"></span>
								</a></li></li>
							<!--<li><a href="" title="好评由高到低">
									好评
									<span class="upArrow"></span>
								</a></li></li>-->
							<li>
								    <?php if(!$hd['get']['param']){ ?>
									<a href="<?php echo U('index',array('searchkey'=>$hd['get']['searchkey'],'isnew'=>1));?>" title="添加日期由高到低">
									最新
									<span class="downArrow"></span>
									<?php }else{ ?>
									<a href="<?php echo U('index',array('searchkey'=>$hd['get']['searchkey'],'param'=>$hd['get']['param'],'isnew'=>1));?>" title="添加日期由高到低">
									最新
									<span class="downArrow"></span>
								<?php } ?>
								
								</a></li></li>
							<li>
								    <?php if(!$hd['get']['param']){ ?>
									<a href="<?php echo U('index',array('searchkey'=>$hd['get']['searchkey'],'pricehight'=>1));?>" title="价格由高到低">
									价格
									<span class="upArrow"></span>
									</a>
									<?php }else{ ?>
									<a href="<?php echo U('index',array('searchkey'=>$hd['get']['searchkey'],'param'=>$hd['get']['param'],'pricehight'=>1));?>" title="价格由高到低">
									价格
									<span class="upArrow"></span>
								</a>
								<?php } ?>
								    <?php if(!$hd['get']['param']){ ?>
									<li><a href="<?php echo U('index',array('searchkey'=>$hd['get']['searchkey'],'pricelowe'=>1));?>" title="价格由低到高">
									价格
									<span class="downArrow"></span>
									</a></li></li>
									</a>
									<?php }else{ ?>
									<li><a href="<?php echo U('index',array('searchkey'=>$hd['get']['searchkey'],'param'=>$hd['get']['param'],'pricelowe'=>1));?>" title="价格由低到高">
									价格
									<span class="downArrow"></span>
								</a></li></li>
								</a>
								<?php } ?>
							
						</div>
						<!--价格输入框-->
						<!--<div class="priceInput">
							<input type="text" name="goPrice" class="goPrice price" />—<input type="text" name="toPrice" class="toPrice price" />
							
							<p style="float:right;margin-left:10px;">
							<a href="javascript:;" class="hd-btn hd-btn-success hd-btn-xm" style="margin: 0;">确定</a>&nbsp;&nbsp;&nbsp;<a href="javascript:;" class="hd-btn hd-btn-danger hd-btn-xm" style="margin: 0;">清除</a>
							</p>
						</div>-->
						<!--价格输入框结束-->
						<!--合并同款-->
						<div class="meger">
							<a href="">
								&nbsp;
							</a>
						</div>
						<!--合并同款结束-->
						
					</div>
					<!--筛选按钮结束-->
					
					</div>
				<!--筛选按钮结束-->
				<!--商品列表-->
				<div class="proList" >
					    <?php if(!empty($goods)){ ?>
					<?php foreach ($goods as $key=>$g){?>
					
					<div class="product">
						
						<!--图片展示-->
						<div class="proImg">
							<a href="<?php echo U('Details/index',array('gid'=>$g['gid']));?>" class="imgLink">
								<span class="newTag"></span>
								<img src="http://127.0.0.1/vancl_php/<?php echo $g['goods_listimg'];?>" alt="" width="228" height="228" />
							</a>
						</div>
						<!--商品标题-->
						<h3 class="proTitle" style="margin-top:10px;">
							<a href="<?php echo U('Details/index',array('gid'=>$g['gid']));?>"><?php echo $g['goods_name'];?></a>
						</h3>
						<!--商品标题结束-->
						<!--商品价格-->
						<div class="proPrice">
							<span>售价:<?php echo $g['shop_price'];?></span>
						</div>
						<!--商品价格结束-->
						<!-- 左边详细信息 -->
						<div class="goodsdesc     <?php if(($key+1)%5==0){ ?>right<?php }else{ ?>left<?php } ?>">
							<!--箭头-->
							<span class="leftArrow     <?php if(($key+1)%5==0){ ?>aright<?php }else{ ?>aleft<?php } ?>"></span>
							<div class="goodsimg">
								<a href="<?php echo U('Details/index',array('gid'=>$g['gid']));?>"><img width="272" height="272" src="http://127.0.0.1/vancl_php/<?php echo $g['goods_listimg'];?>" alt="" /></a>
							</div>
							<h3 class="goodstitle">
								<?php echo $g['goods_name'];?>
							</h3>
							<p class="sn">
								产品货号:<?php echo $g['goods_sn'];?>
							</p>
							<div class="money">
								<p class="money1">售价:<?php echo $g['shop_price'];?></p>
								<p class="goodscomm">好评率<br /><strong>100%</strong></p>
							</div>
						</div>
						<!-- 左边详细信息结束 -->
					</div>
					<?php }?>
						
				</div>
				<!--商品列表-->
				<div class="clearfix"></div>
				<!--分页开始-->
				<div class="hd-page">
					<?php echo $page;?>
				</div>
				<!--分页结束-->
			</div>
					<?php }else{ ?>
					<div style="font-size:17px;text-align: center;color:#666;padding:50px 0;">目前没有商品~!</div>
				
			<?php } ?>
			<!--列表头部结束-->
			
		</div>
		<!-- 列表页结束-->

		<!-- 页脚开始 -->
		<div class="clearfix"></div>
		<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<div id="foot">
			<div class="footerList">
				<div class="center">
					<dl>
						<dt><a href="">关于凡客</a></dt>
						<dd><a href="">公司简介</a></dd>
						<dd><a href="">联系我们</a></dd>
						<dd><a href="">友情链接</a></dd>
						
					</dl>
					<dl>
						<dt><a href="">新手指南</a></dt>
						<dd><a href="">账户注册</a></dd>
						<dd><a href="">购物流程</a></dd>
						<dd><a href="">网站地图</a></dd>
						<dd><a href="">商家入驻</a></dd>
					</dl>
					<dl>
						<dt><a href="">配送范围及时间</a></dt>
						<dd><a href="">国内配送</a></dd>
						<dd><a href="">订单拆分</a></dd>
						
					</dl>
					<dl>
						<dt><a href="">支付方式</a></dt>
						<dd><a href="">货到付款</a></dd>
						<dd><a href="">在线支付</a></dd>
						<dd><a href="">礼品卡及账户余额</a></dd>
						<dd><a href="">其他支付方式</a></dd>
						
					</dl>
					<dl>
						<dt><a href="">售后服务</a></dt>
						<dd><a href="">退换货政策</a></dd>
						<dd><a href="">退换货办理流程</a></dd>
						<dd><a href="">退换货网上办理</a></dd>
						<dd><a href="">退款说明</a></dd>
						<dd><a href="">调查问卷</a></dd>
						
					</dl>
					<dl style="border:none;">
						<dt><a href="">帮助中心</a></dt>
						<dd><a href="">在线客服</a></dd>
						<dd><a href="">找回密码</a></dd>
						<dd><a href="">隐私声明</a></dd>
						
					</dl>
				</div>
			</div>
			<!--条款图片-->
			<div class="footerListImg">
				<div class="wrapImg">
					<a href="" class="img1"></a>
				</div>
				<div class="wrapImg">
					<a href="" class="img2"></a>
				</div>
				<div class="wrapImg">
					<a href="" class="img3"></a>
				</div>
				<div class="wrapImg">
					<a href="" class="img4"></a>
				</div>
				
			</div>
			<!--条款图片结束-->
			<!--版权信息和工商-->
			<div class="footerBotoom">
				<div class="copy">
					Copyright 2007 - 2014 vancl.com All Rights Reserved 京ICP证100557号 京公网安备11011502002400号 出版物经营许可证新出发京批字第直110138号
				</div>
				<div class="gsImg">
					<div class="wrapFootImg">
					<a href="" class="gsImg1"></a>
					<a href="" class="gsImg2"></a>
					<a href="" class="gsImg3"></a>
					<a href="" class="gsImg4"></a>
					<a href="" class="gsImg5"></a>
					</div>
				</div>
				
			</div>
			<!--版权信息和工商-->
			
		</div>
		</div>
		<!-- 页脚结束 -->

	</body>

</html>